gdkgl: Texture quads in one giant draw call
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 22 Nov 2014 18:17:22 +0000 (10:17 -0800)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 22 Nov 2014 18:34:47 +0000 (10:34 -0800)
commitc01e37a9a5db5957d08fcb4b8f11ea86c344f6d1
tree0500a6e3ec72f11413f2260f14a11625b9f4f68c
parent6ffba866a61dfcd854711c97e93dce641cb055b1
gdkgl: Texture quads in one giant draw call

This requires us to use GL_TRIANGLES and six verts per quad instead
of four, which makes me think it might not be worth it on
well-optimized GL drivers. However, from talking to some driver
developers about it, the GL_TRIANGLES should be faster, since this
means that there's one giant contiguous buffer instead of many small
buffers.

If we were really rendering a lot of quads, I'd use an element buffer
and GL_PRIMITIVE_RESTART, but we're really not ever rendering that
many quads, and the setup cost for that would just be too annoying.
gdk/gdkgl.c